// 15. A+B problem plus/中等/大数想加
#include <bits/stdc++.h>
using namespace std;

string BigDataAdd(string a, string b) {
    int prefix = a.length() < b.length()? b.length() - a.length() + 1 : 1;
    a.insert(0, prefix, '0');
    int i = a.length() - 1;
    int j = b.length() - 1;
    for (; i>0 && j>=0; i--, j--) {
        int tmp = a[i] - '0' + b[j] - '0';
        a[i] = '0' + tmp % 10;
        a[i-1] += (tmp / 10);
    }
    for (int i=0; a[i] == '0';) a.erase(0,1);
    return a;
}

int main_ab() {
    int n;
    string a,b;
    cin >> n;
    while (n-->0) {
        cin >> a >> b;
        cout << BigDataAdd(a, b) << endl;
    }
    return 0;
}
